/**
 * Created by Sergey Kharlamov.
 * Date: Nov 19, 2005
 * Time: 6:54:44 PM
 */
package univer.oko.gui.table;

import javax.swing.*;
import javax.swing.table.TableModel;
import java.awt.*;

public class TTable extends JTable {


    public TTable(TableModel model) {
        super(model);
        this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        this.setAutoResizeMode(AUTO_RESIZE_NEXT_COLUMN);
        this.setBackground(Color.WHITE);
        this.getTableHeader().setDefaultRenderer(new THeaderRenderer());
        this.getTableHeader().setReorderingAllowed(false);
        this.getTableHeader().setBackground(Color.LIGHT_GRAY);
        //    this.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        //   this.setAutoResizeMode(JTable.AUTO_RESIZE_NEXT_COLUMN);
    }
}
